<template>
    <div class="grid-container">
        <el-row>
            <el-col :span="6" :xs="12" :sm="12" :lg="6">
                <div class="grid-content">
                    <div class="card-panel-title">用户量</div>
                    <div class="card-panel-content">
                        <span class="card-quantity">3423423</span>
                        <el-icon size="30" class="card-panel-icon">
                            <inconify icon="ep:user" />
                        </el-icon>
                    </div>
                </div>
            </el-col>
            <el-col :span="6" :xs="12" :sm="12" :lg="6">
                <div class="grid-content">
                    <div class="card-panel-title">访问量</div>
                    <div class="card-panel-content">
                        <span class="card-quantity">546456456</span>
                        <el-icon size="30" class="card-panel-icon">
                            <inconify icon="tdesign:gesture-click" />
                        </el-icon>
                    </div>
                </div>
            </el-col>
            <el-col :span="6" :xs="12" :sm="12" :lg="6">
                <div class="grid-content">
                    <div class="card-panel-title">下载量</div>
                    <div class="card-panel-content">
                        <span class="card-quantity">89789</span>
                        <el-icon size="30" class="card-panel-icon">
                            <inconify icon="ep:download" />
                        </el-icon>
                    </div>
                </div>
            </el-col>
            <el-col :span="6" :xs="12" :sm="12" :lg="6">
                <div class="grid-content">
                    <div class="card-panel-title">使用量</div>
                    <div class="card-panel-content">
                        <span class="card-quantity">12312</span>
                        <el-icon size="30" class="card-panel-icon">
                            <inconify icon="nimbus:user-group" />
                        </el-icon>
                    </div>
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script setup name="CardPanel">
import { Icon as inconify } from '@iconify/vue'
</script>

<style lang="scss" scoped>
.grid-container {
    & .grid-content {
        @include border;
        margin-top: 5%;
        margin-left: 5%;
        border-radius: 10px;

        & .card-panel-title {
            margin-left: 5%;
            font-weight: 600;
            font-size: 1.25rem;
            line-height: 1.75rem;
        }

        & .card-panel-content {
            @include flex-center-v;
            width: 100%;
            margin-top: 10%;
            margin-bottom: 10%;

            & .card-quantity {
                width: 50%;
                margin-left: 5%;
            }

            & .card-panel-icon {
                margin-left: 25%;
            }
        }
    }

    & .el-row {
        & .el-col {
            &:last-of-type {
                & .grid-content {
                    margin-right: 5%;
                }
            }
        }
    }
}
/* 媒体查询：屏幕宽度小于1024px */
@media (max-width: 1023px) {
    .el-row {
        & .el-col {
            &:nth-of-type(2) {
                & .grid-content {
                    margin-right: 5%;
                }
            }
        }
    }
}
</style>
